package com.link.play.fit.ai.kv


import com.link.play.fit.ai.bean.AdjustGoalsData
import com.link.play.fit.ai.bean.UserGuide

/**
 * 用户信息
 */
object AuthCache {
    val kv = KVStore("AuthCache")
    var uid: String by kv.storeString("")
    var googleAdvertiserId: String by kv.storeString("")

    //var installReferrer: String by kv.storeString("")
    var isInitGuide: Boolean by kv.storeBool()//引导页

    //var configUpdateTime: Long by kv.storeLong()//配置上次更新时间
    //var getConfigInterval: String by kv.storeString("4")//配置更新间隔
    var isGuideHello: Boolean by kv.storeBool()//引导页

    var isFirstShowStreakDialog: Boolean by kv.storeBool()

    var goalsData: AdjustGoalsData? by kv.storeParcelable()
    var pushCount: Int by kv.storeInt(0)
    var isVip: Boolean by kv.storeBool(true)
    var isBurnedSwitch: Boolean by kv.storeBool(true)
    var mealsAlarmCount: Int by kv.storeInt(0) //早中晚推送次数
    var drinkingAlarmCount: Int by kv.storeInt(0) //饮水次数

    var timeDay: String by kv.storeString("") //2025-04-06

    var firstMeals: String by kv.storeString("") //12:22:PM
    var secondMeals: String by kv.storeString("")
    var thirdMeals: String by kv.storeString("")

    var SUB_PRODUCT_ID: String ="" //订阅ID
    var FIRBASE_SUB_PRODUCT_ID: String =""//订阅ID
    var SUB_CURRENCY: String ="" //订阅价格类型 USD
    var SUB_PRICE_VALUE: Double =0.0 //订阅价格 4.66

    var SUB_PRODUCT_TYPE: String by kv.storeString("week") //订阅类型 year week


    var imperialMetric: Boolean by kv.storeBool()//false Imperial 英制; true Metric 公制

    var isScanGuided: Boolean by kv.storeBool()//扫描引导

    var tempUserGuide: String? by kv.storeString(null)

    var fcmToken: String? by kv.storeString(null)//fcm推送token
    var tokenCount: Int by kv.storeInt()//token上报次数

    var userAgreementAgree : Boolean by kv.storeBool()//用户是否同意用户协议


    fun clear() {
        kv.clearAll()
    }
}